package com.mdb.open.trade.feign;
/*
 * Copyright (C), 2017-2019 澳发科技(MDB)
 * FileName: OutreachClient.java
 * Author:   符楚
 * Date:     2019-08-05 11:01
 * History:
 * <author>          <time>          <version>          <desc>
 * 符楚               2019-08-05          V1.00             新建
 * -----------------------------------------------------------
 * 作者姓名           修改时间           版本号            描述
 */

import com.mdb.bc.api.data.Result;
import com.mdb.bc.api.data.ResultEx;
import com.mdb.open.common.enums.App;
import com.mdb.open.trade.feign.dto.*;
import com.mdb.open.trade.feign.fallback.OutreachFallbackFactory;
import com.mdb.open.trade.feign.vo.CargoScanVo;
import com.mdb.open.trade.feign.vo.CoreLimitVo;
import com.mdb.open.trade.feign.vo.TradeFinanceBlacklistScanVo;
import com.mdb.open.trade.service.trade.handle.vo.DDAccVo;
import com.mdb.open.trade.service.trade.handle.vo.LoanAccountInfoVo;
import com.mdb.open.trade.service.trade.handle.vo.LoanCommitVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 外联服务<br>
 * <br>
 *
 * @author 符楚
 * @Date 2019-08-05 11:01
 */
@FeignClient(value = "cnt-outreach", fallbackFactory = OutreachFallbackFactory.class)
public interface OutreachClient {


    /**
     * 企业三要素验证
     *
     * @param dto
     * @return
     */
    @PostMapping("/qichacha/ECIMatch/CompanyVerify")
    Result<String> companyVerify(@RequestBody CompanyVerifyDto dto);



    /**
     * 查询额度
     */
    @PostMapping(value = "/core_api/0351070", headers = {"app=" + App.PRODUCT, "content-type=application/json"})
    ResultEx<CoreLimitVo> requestCoreLimitApi0351070(@RequestBody CoreLimitDto dto);


    @PostMapping(value = "/core_api/0351108", headers = {"app=" + App.TRADE_FINANCE, "content-type=application/json"})
    @ApiOperation("0351108-开立活期账户")
    ResultEx<DDAccVo> requestCoreApi0351108(@RequestBody CommonRequestDto dto);

    @PostMapping(value = "/core_api/0351321", headers = {"app=" + App.TRADE_FINANCE, "content-type=application/json"})
    @ApiOperation("0351321-贷款放款")
    ResultEx<LoanCommitVo> requestCoreApi0351321(@RequestBody CommonRequestDto dto);

    @PostMapping(value = "/core_api/0131394", headers = {"app=" + App.TRADE_FINANCE, "content-type=application/json"})
    @ApiOperation("0131394-贷款账户查询")
    ResultEx<LoanAccountInfoVo> requestCoreApi0131394(@RequestBody CommonRequestDto dto);

    @PostMapping(value = "/crla/cargo_scan", headers = {"app=TF", "content-type=application/json"})
    @ApiOperation("贸易融资货物筛查")
    public ResultEx<CargoScanVo> cargoScan(@RequestBody CargoScanDto dto);

    @PostMapping(value = "/crla/trade_finance_blacklist_scan", headers = {"app=TF", "content-type=application/json"})
    @ApiOperation("贸易融资信息黑名单筛查")
    public ResultEx<TradeFinanceBlacklistScanVo> tradeFinanceBlacklistScan(@RequestBody TradeFinanceBlacklistScanDto dto);


}
